For the purpose of conditioning the air in the vehicle compartment, an electric compressor compresses and supplies a refrigerant in refrigeration cycles. In general, the electric compressor is disposed in an engine room. The electric compressor like this includes: a compression mechanism unit configured to compress the refrigerant; a motor configured to rotate a rotor of the compression mechanism unit; and an inverter configured to drive the motor by supplying electric power to the motor. These components are set inside a case. A connector is connected to the case of the electric compressor. Thereby, the electric power is supplied to the electric compressor from a battery as a power supply.
In this respect, once the connector connected to the power supply is unplugged while in an active-line state, the supply of voltage from the power supply stops. Thus, voltage stored in a smoothing capacitor is discharged due to leakage current from elements in the inverter. Nevertheless, because the amount of discharge is small, there is a time lag until the voltage of the smoothing capacitor decreases to a safe voltage value. For this reason, there is a risk of electric shock. Against this background, Patent Literature 1 has been disclosed with an intention of preventing the electric shock. In a power supply apparatus disclosed in Patent Literature 1, the connector is provided with an inserted/unplugged state detecting circuit. Once the inserted/unplugged state detecting circuit detects that the connector is unplugged, the power supply apparatus discharges the voltage stored in the smoothing capacitor.